package com.team7.happycommunity.parkservice.controller;

import com.team7.happycommunity.parkservice.common.CommonResult;
import com.team7.happycommunity.parkservice.dto.AddParkingApply;
import com.team7.happycommunity.parkservice.service.ParkingApplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("/parkingapply")
public class ParkingApplyController {

    @Autowired
    ParkingApplyService parkingApplyService;

    @PostMapping("/add")
    @ResponseBody
    public CommonResult getResult(@RequestBody AddParkingApply addParkingApply){
        System.out.println("123");
        int i = parkingApplyService.add(addParkingApply);
        return i==0?CommonResult.failed():CommonResult.success();
    }

//    @Post()

}
